package com.aspose.cells;

public abstract class ActiveXControlBase {
   Shape b;
   byte[] c;
   int d;
   zaa e;

   ActiveXControlBase(Shape shape) {
      this.b = shape;
   }

   static ActiveXControl a(int var0, UnknownControl var1, Shape var2) {
      Object var3 = null;
      switch(var0) {
      case 0:
         var3 = new CommandButtonActiveXControl(var2);
         break;
      case 1:
         var3 = new ComboBoxActiveXControl(var2);
         break;
      case 2:
         var3 = new CheckBoxActiveXControl(var2);
         break;
      case 3:
         var3 = new ListBoxActiveXControl(var2);
         break;
      case 4:
         var3 = new TextBoxActiveXControl(var2);
         break;
      case 5:
         var3 = new SpinButtonActiveXControl(var2);
         break;
      case 6:
         var3 = new RadioButtonActiveXControl(var2);
         break;
      case 7:
         var3 = new LabelActiveXControl(var2);
         break;
      case 8:
         var3 = new ImageActiveXControl(var2);
         break;
      case 9:
         var3 = new ToggleButtonActiveXControl(var2);
         break;
      case 10:
         var3 = new ScrollBarActiveXControl(var2);
         break;
      case 11:
      default:
         if (var1 != null) {
            return var1;
         }

         var3 = new UnknownControl(var2);
      }

      return (ActiveXControl)var3;
   }

   public Workbook getWorkbook() {
      return this.b == null ? null : this.b.L().n();
   }

   public abstract int getType();

   abstract int a(int var1);

   void b(int var1) {
      int var2 = this.a(var1);
      this.d |= var2;
   }

   void a(int var1, boolean var2) {
      int var3 = this.a(var1);
      if (var2) {
         this.d |= var3;
      } else {
         this.d &= ~var3;
      }

   }

   boolean c(int var1) {
      int var2 = this.a(var1);
      return (this.d & var2) != 0;
   }

   public double getWidth() {
      return zbuc.a(this.e.h);
   }

   public void setWidth(double value) {
      this.e.h = zbuc.a(value);
      this.b(8);
   }

   public double getHeight() {
      return zbuc.a(this.e.i);
   }

   public void setHeight(double value) {
      this.e.i = zbuc.a(value);
      this.b(8);
   }

   public byte[] getMouseIcon() {
      return this.e.k;
   }

   public void setMouseIcon(byte[] value) {
      this.e.k = value;
      this.setMousePointer(99);
      this.b(15);
   }

   public int getMousePointer() {
      return this.e.g & 255;
   }

   public void setMousePointer(int value) {
      this.e.g = (byte)value;
      this.b(5);
   }

   public int getForeOleColor() {
      return this.e.b;
   }

   public void setForeOleColor(int value) {
      this.e.b = value;
      this.b(3);
   }

   public int getBackOleColor() {
      return this.e.c;
   }

   public void setBackOleColor(int value) {
      this.e.c = value;
      this.b(4);
   }

   public boolean isVisible() {
      if (this.b != null) {
         return !this.b.isHidden();
      } else {
         return true;
      }
   }

   public void setVisible(boolean value) {
      if (this.b != null) {
         this.b.setHidden(!value);
      }

   }

   public boolean getShadow() {
      return this.b != null ? this.b.z : true;
   }

   public void setShadow(boolean value) {
      if (this.b != null) {
         this.b.z = value;
      }

   }

   public String getLinkedCell() {
      return this.b != null ? this.b.getLinkedCell() : null;
   }

   public void setLinkedCell(String value) {
      if (this.b != null) {
         this.b.setLinkedCell(value);
      }

   }

   public String getListFillRange() {
      return this.b != null ? this.b.getInputRange() : null;
   }

   public void setListFillRange(String value) {
      if (this.b != null) {
         this.b.setInputRange(value);
      }

   }

   public byte[] getData() throws Exception {
      return null;
   }
}
